#include <windows.h>

#include "lib.h"
#include "cassrvc.h"
#include "rlserv.h"
#include "rlproto.h"
#include "fileversion.h"

//
// NOTE:  uint32 getrand() is defined in "cassrvc.cpp"
//

class RouletteCasinoService : public CasinoService
{
	public:
		RouletteCasinoService();

		ServerInterface* createServer();
};

RouletteCasinoService::RouletteCasinoService()
	: CasinoService("Roulette", "Roulette Service", 2056)
{
	m_VersionStr = CASINO_RELEASENUM;

    m_iProtoMajor = PROTO_VERSION1;
    m_iProtoMinor = PROTO_VERSION2;
}

ServerInterface*
RouletteCasinoService::createServer()
{
	return new RouletteServer(port);
}

int
main(int argc, char* argv[])
{
    RouletteCasinoService service;
    
    // Parse for standard arguments (install, uninstall, version etc.)
	//
    if (!service.ParseStandardArgs(argc, argv))
	{
        // Didn't find any standard args so start the service
		//
        // Uncomment the DebugBreak line below to enter the debugger
        // when the service is started.
		//

#ifdef DEBUG
#if 0
		DebugBreak();
#endif
#endif

        service.StartService();
    }

    // When we get here, the service has been stopped
	//
    return service.m_Status.dwWin32ExitCode;
}
